
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    var obj={n:1};
    function fn2(a){
       a.n=2;
    }    
    fn2(obj);
    console.log(obj.n);//2
    // fn2 函数执行的时候，实参传递的是一个空间地址
    </script>
</body>
</html>